package com.cxl.service.impl;

import com.cxl.dao.CourseDao;
import com.cxl.entity.*;
import com.cxl.service.CourseService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@DubboService
public class CourseServiceImpl implements CourseService {


    @Autowired
    CourseDao courseDao;

    @Override
    public User findByUser(User user) {
        return courseDao.findByUser(user);
    }

    @Override
    public void upenddate(Integer uid) {
        courseDao.upenddate(uid);
    }

    @Override
    public List<Course> findByCourseList() {
        return courseDao.findByCourseList();
    }

    @Override
    public void upCheck(Course course) {
        courseDao.upCheck(course);
    }

    @Override
    public Course findByCourseID(Integer cid) {
        return courseDao.findByCourseID(cid);
    }

    @Override
    public void upState(Course course) {
        courseDao.upState(course);
    }

    @Override
    public List<CourseType> findByTypes() {
        return courseDao.findByTypes();
    }

    @Override
    public Integer findByCname(String cname) {
        return courseDao.findByCname(cname);
    }

    @Override
    public Course add(Course course) {
        courseDao.add(course);
        return course;
    }

    @Override
    public void addVideo(Course course) {
        courseDao.addVideo(course);
    }

    @Override
    public Integer findByApply(Integer cid, Integer uid) {
        return courseDao.findByApply(cid,uid);
    }

    @Override
    public Integer findByComment(Integer cid) {
        return courseDao.findByComment(cid);
    }

    @Override
    public Integer findByComment1(Integer cid) {
        return courseDao.findByComment1(cid);
    }
    @Override
    public Integer findByComment2(Integer cid) {
        return courseDao.findByComment2(cid);
    }

    @Override
    public List<Remark> findByRemark(Integer cid) {
        return courseDao.findByRemark(cid);
    }

    @Override
    public List<Remark> findByRemark1(Integer cid) {
        return courseDao.findByRemark1(cid);
    }

    @Override
    public List<Remark> findByRemark2(Integer cid) {
        return courseDao.findByRemark2(cid);
    }

    @Override
    public void addCom(Remark remark) {
        courseDao.addCom(remark);
    }


}
